package cn.db101.fairy.api

import com.dtflys.forest.annotation.BaseRequest
import com.dtflys.forest.annotation.Get
import com.dtflys.forest.annotation.JSONBody
import com.dtflys.forest.annotation.Post
import com.dtflys.forest.annotation.Query
import com.dtflys.forest.annotation.Var
import org.springframework.stereotype.Repository

/**
 * @author zooy
 * @since 2025/3/26-9:48
 */
@Repository
@BaseRequest(baseURL = "https://api.weixin.qq.com")
interface WxApi {

    @Get("cgi-bin/token")
    fun getWxAccessToken(@Query accessTokenRequest: AccessTokenRequest): AccessTokenResponse

    @Post("wxa/getwxacodeunlimit?access_token={accessToken}")
    fun getUnlimitedQrcode(@Var("accessToken") accessToken: String, @JSONBody qrcodeRequest: QrcodeRequest): ByteArray?

}
